package net.protocol.diameter.avp;

import java.nio.ByteBuffer;

/**
 * <pre>
 *    Enumerated
 *       Enumerated is derived from the Integer32 AVP Base Format.  
 *       The definition contains a list of valid values and their
 *       interpretation and is described in the Diameter application
 *       introducing the AVP.
 * </pre>
 * 
 * @author jinhongw@gmail.com
 */
public class Enumerated extends Integer32 {

    /**
     * @param code AVP Code
     * @param data AVP Data
     */
	public Enumerated(int code, int data) {
        super(code, data);
    }

    /**
     * @param code     AVP Code
     * @param vendorId Vendor-ID
     * @param data     AVP Data
     */
	public Enumerated(int code, int vendorId, int data) {
        super(code, vendorId, data);
    }

    /**
     * Creates a new <code>Enumerated</code> with the given DiameterAVPHeader and source ByteBuffer
     *
     * @param header Diameter AVP Header
     * @param src The buffer from which bytes are to be retrieved
     */
    Enumerated(DiameterAVPHeader header, ByteBuffer src) {
        super(header, src);
    }
	
    @Override
    public final DataFormat getType() {
        return DataFormat.Enumerated;
    }

    @Override
    public String getName() {
        return DataFormat.Enumerated.name();
    }
}
